home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Developer Utilities / Installer 4.0GM SDK / Script Examples / PowerPC⁄68K App Install / CheckIfInternalUserFunc.c next >
Encoding:
C/C++ Source or Header  |  1994-02-10  |  719 b   |  28 lines  |  [TEXT/MPS ]

  1. /* applec is only defined by MPW C so we can use it to make versions that work
  2.   with MPW C and THINK C
  3.  */
  4. #ifdef applec
  5.  
  6. #include    <Files.h>
  7. #endif
  8.  
  9. pascal Boolean CheckIfInternalUserFunc(short targetVRefNum, long blessedID, long ignored )
  10. {
  11. #pragma unused (blessedID)
  12. #pragma unused (ignored)
  13.  
  14.     HParamBlockRec    volInfoPBRec;
  15.     OSErr            err;
  16.     
  17.     volInfoPBRec.volumeParam.ioResult         = noErr;
  18.     volInfoPBRec.volumeParam.ioCompletion     = 0;
  19.     volInfoPBRec.volumeParam.ioNamePtr         = 0L;
  20.     volInfoPBRec.volumeParam.ioVRefNum         = targetVRefNum;
  21.     volInfoPBRec.volumeParam.ioVolIndex     = 0;        
  22.     err = PBHGetVInfo( &volInfoPBRec, 0 );
  23.     
  24.     if( err == noErr && volInfoPBRec.volumeParam.ioVDRefNum == -33 )
  25.         return 1;
  26.     else         
  27.         return 0;
  28. }